/**
 * Copyright (c) Huawei Technologies Co., Ltd. 2020-2022. All rights reserved.
 */

#include <linux/module.h>
#include <linux/spinlock.h>
#include <linux/pci.h>

#include "dvpp_trs_ops.h"
#include "dvpp_share_mem_ctrl.h"
#include "dvpp_cmdlist_ioctl.h"

#define PCI_VENDOR_ID_HUAWEI 0x19e5
static const struct pci_device_id g_pci_dvpp_tbl[] = {
    {PCI_VDEVICE(HUAWEI, 0xd802), 0},
    {}};
MODULE_DEVICE_TABLE(pci, g_pci_dvpp_tbl);

static int32_t __init dvpp_vdrv_init(void)
{
    dvpp_trs_sqe_update_init();
    dvpp_cmdlist_dev_init();
    spin_lock_init(&g_share_mem_pool_lock);
    return 0;
}

static void __exit dvpp_vdrv_exit(void)
{
    dvpp_cmdlist_dev_exit();
    dvpp_trs_sqe_update_uninit();
}

module_init(dvpp_vdrv_init);
module_exit(dvpp_vdrv_exit);

MODULE_LICENSE("GPL");
